package br.com.lavitstudio.game;

import java.util.Random;

public class level_Beach {
	private Block[][] block;
	
	public level_Beach(Block[][] block) {
		this.block = block;
	}
	
	public void generateLevel() {
		for(int y=0;y<block.length;y++) {
			for(int x=0; x<block[0].length; x++) {
				if(new Random().nextInt(100) < 1 && block[x][y].id == Tile.block.get("earth")) {
					for(int i = 0; i < (new Random().nextInt(5) + 1); i++) {
						if((x + i) < Level.worldW) {
							block[x+i][y].id = Tile.block.get("sand");
						}
					}
				}
			}
		}
	}
}
